package com.ckd.flyingtrip.activity;

import android.os.Bundle;
import android.view.View;
import android.widget.Button;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.ckd.flyingtrip.R;
import com.ckd.flyingtrip.utils.Tools;

import butterknife.BindView;
import butterknife.ButterKnife;
import butterknife.OnClick;

/*
 * 设置
 * */
public class OptionActivity extends BaseActivity {
    @BindView(R.id.btn_a)
    LinearLayout btnA;
    @BindView(R.id.btn_b)
    LinearLayout btnB;
    @BindView(R.id.btn_c)
    LinearLayout btnC;
    @BindView(R.id.btn_d)
    LinearLayout btnD;
    @BindView(R.id.btn_e)
    LinearLayout btnE;
    @BindView(R.id.btn_f)
    LinearLayout btnF;
    @BindView(R.id.btn_close)
    Button btnClose;
    @BindView(R.id.toolber_color_title)
    TextView toolberTitle;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_option);
        ButterKnife.bind(this);
        init();
    }

    private void init() {
        toolberTitle.setText("设置");
    }

    @OnClick({R.id.btn_a, R.id.btn_b, R.id.btn_c, R.id.btn_d, R.id.btn_e, R.id.btn_f, R.id.btn_close, R.id.btn_upmima, R.id.btn_policy})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.btn_a:
                startAction(AboutOusActivity.class);
//                关于我们
                break;
            case R.id.btn_b:
//                用户反馈
                startAction(OptionUserFKActivity.class);
                break;
            case R.id.btn_c:
//                用户协议
                startAction(OptionUserProtocolActivity.class);
                break;
            case R.id.btn_d:
//                押金协议
                startAction(XieyiActivity.class);
                break;
            case R.id.btn_e:
//                充值协议
                break;
            case R.id.btn_f:
//                清除缓存
                break;
            case R.id.btn_close:
//                退出登录
                Tools.closeLogIN(this);
                break;
            case R.id.btn_upmima:
//                修改密码
                startAction(UserUpwd_Activity.class);
                break;
            case R.id.btn_policy:
                startAction(UserLogInPolicyActivity.class);
                break;
        }
    }

    @OnClick(R.id.toolber_color_back)
    public void onViewClicked() {
        finish();
    }
}
